package com.example.yls.demoa;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
      private ArrayList<Student> studentArrayList= new ArrayList<>();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void initStuArraylist(){
        Student s1= new Student("路飞",18,R.drawable.d1);
        Student s2= new Student("海贼王",12,R.drawable.d2);
        Student s3= new Student("多佛",22,R.drawable.d3);

        studentArrayList.add(s1);
        studentArrayList.add(s2);
        studentArrayList.add(s3);
    }

}
